package src;

//import com.sun.org.apache.xpath.internal.operations.String;

import java.util.WeakHashMap;

/**
 * Created by dell
 * on 2017/7/28.
 */
public class WeakHashMapTest {
    public static void main(String[] args) {
        WeakHashMap whm=new WeakHashMap();
        whm.put(new String("今天"),new String("hello"));
        whm.put("456",new String("hello world"));
        whm.put("java",new String("yeah"));
        whm.forEach((key,value)-> System.out.println(key+","+value));
        System.out.println(whm);
        System.gc();
        System.runFinalization();
        System.out.println(whm);
    }
}
